package com.flow.action;

import org.apache.struts2.ServletActionContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.flow.tools.PrintCode;

public class PrintCodeAction extends HibernateDaoSupport {

	public void getCode(){
		
		PrintCode printCode = new PrintCode();
		
		try {
			
			String code = printCode.getCodePic(ServletActionContext.getResponse().getOutputStream());
			ServletActionContext.getRequest().getSession().setAttribute("validatecode", code);
			
		} catch (Exception e) {
			
			e.printStackTrace();
			
		}
		
	}
}
